<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
<!-- QCtmLoadingDialog.cpp -->
  <meta name="description" content="等待加载窗口.">
  <title>QCtmLoadingDialog Class | QCustomUi 1.16.0</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
    <div class="main">
    <div class="main-rounded">
        <div class="navigationbar">
        <ul>
<li><a href="index.html" translate="no">QCustomUi 1.16.0</a></li>
<li><a href="qcustomui-module.html" translate="no">QCustomUi</a></li>
<li>QCtmLoadingDialog</li>
<li id="buildversion">QCustomUi 1.16.0 Reference Documentation</li>
    </ul>
    </div>
</div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3 id="toc">Contents</h3>
<ul>
<li class="level1"><a href="#public-types">Public Types</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#public-slots">Public Slots</a></li>
<li class="level1"><a href="#reimplemented-protected-functions">Reimplemented Protected Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title" translate="no">QCtmLoadingDialog Class</h1>
<!-- $$$QCtmLoadingDialog-brief -->
<p>等待加载窗口. <a href="#details">More...</a></p>
<!-- @@@QCtmLoadingDialog -->
<div class="table"><table class="alignedsummary" translate="no">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">  <span class="preprocessor">#include &lt;QCtmLoadingDialog.h&gt;</span></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> QWidget</td></tr>
</table></div>
<ul>
<li><a href="qctmloadingdialog-members.html">List of all members, including inherited members</a></li>
</ul>
<h2 id="public-types">Public Types</h2>
<div class="table"><table class="alignedsummary" translate="no">
<tr><td class="memItemLeft rightAlign topAlign"> enum class </td><td class="memItemRight bottomAlign"><b><a href="qctmloadingdialog.html#Result-enum" translate="no">Result</a></b> { Cancel, Done }</td></tr>
</table></div>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary" translate="no">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qctmloadingdialog.html#QCtmLoadingDialog" translate="no">QCtmLoadingDialog</a></b>(QWidget *<i>parent</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="qctmloadingdialog.html#dtor.QCtmLoadingDialog" translate="no">~QCtmLoadingDialog</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qctmloadingdialog.html#cancelEnable" translate="no">cancelEnable</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QMovie *</td><td class="memItemRight bottomAlign"><b><a href="qctmloadingdialog.html#movie" translate="no">movie</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmloadingdialog.html#setCancelEnable" translate="no">setCancelEnable</a></b>(bool <i>flag</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmloadingdialog.html#setMovie" translate="no">setMovie</a></b>(QMovie *<i>movie</i>)</td></tr>
</table></div>
<h2 id="public-slots">Public Slots</h2>
<div class="table"><table class="alignedsummary" translate="no">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmloadingdialog.html#cancel" translate="no">cancel</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmloadingdialog.html#done" translate="no">done</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QCtmLoadingDialog::Result </td><td class="memItemRight bottomAlign"><b><a href="qctmloadingdialog.html#exec" translate="no">exec</a></b>()</td></tr>
</table></div>
<h2 id="reimplemented-protected-functions">Reimplemented Protected Functions</h2>
<div class="table"><table class="alignedsummary" translate="no">
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qctmloadingdialog.html#closeEvent" translate="no">closeEvent</a></b>(QCloseEvent *<i>event</i>) override</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qctmloadingdialog.html#eventFilter" translate="no">eventFilter</a></b>(QObject *<i>watched</i>, QEvent *<i>event</i>) override</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qctmloadingdialog.html#hideEvent" translate="no">hideEvent</a></b>(QHideEvent *<i>event</i>) override</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qctmloadingdialog.html#keyPressEvent" translate="no">keyPressEvent</a></b>(QKeyEvent *<i>event</i>) override</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qctmloadingdialog.html#showEvent" translate="no">showEvent</a></b>(QShowEvent *<i>e</i>) override</td></tr>
</table></div>
<!-- $$$QCtmLoadingDialog-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
</div>
<!-- @@@QCtmLoadingDialog -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$Result$$$Cancel$$$Done -->
<h3 class="fn" translate="no" id="Result-enum">enum class QCtmLoadingDialog::<span class="name">Result</span></h3>
<p>loading窗口退出状态.</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code translate="no">QCtmLoadingDialog::Result::Cancel</code></td><td class="topAlign tblval"><code translate="no">0</code></td><td class="topAlign">loading窗口以取消或中止状态退出.</td></tr>
<tr><td class="topAlign"><code translate="no">QCtmLoadingDialog::Result::Done</code></td><td class="topAlign tblval"><code translate="no">1</code></td><td class="topAlign">loading窗口以完成状态退出.</td></tr>
</table></div>
<!-- @@@Result -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QCtmLoadingDialog[overload1]$$$QCtmLoadingDialogQWidget* -->
<h3 class="fn" translate="no" id="QCtmLoadingDialog"><code class="details extra" translate="no">[explicit]</code> QCtmLoadingDialog::<span class="name">QCtmLoadingDialog</span>(<span class="type">QWidget</span> *<i>parent</i>)</h3>
<p>构造函数，在 <i translate="no">parent</i> 的顶层窗口上覆盖加载窗口.</p>
<div class="admonition note">
<p><b>Note: </b><i translate="no">parent</i> 不能为空.</p>
</div>
<!-- @@@QCtmLoadingDialog -->
<!-- $$$~QCtmLoadingDialog[overload1]$$$~QCtmLoadingDialog -->
<h3 class="fn" translate="no" id="dtor.QCtmLoadingDialog"><code class="details extra" translate="no">[virtual noexcept]</code> QCtmLoadingDialog::<span class="name">~QCtmLoadingDialog</span>()</h3>
<p>析构该窗口对象.</p>
<!-- @@@~QCtmLoadingDialog -->
<!-- $$$cancel[overload1]$$$cancel -->
<h3 class="fn" translate="no" id="cancel"><code class="details extra" translate="no">[slot]</code> <span class="type">void</span> QCtmLoadingDialog::<span class="name">cancel</span>()</h3>
<p>Loading 窗口加载未完成时调用该函数，此时exec返回Cancel.</p>
<p><b>See also </b><a href="qctmloadingdialog.html#done" translate="no">done</a>.</p>
<!-- @@@cancel -->
<!-- $$$cancelEnable -->
<h3 class="fn" translate="no" id="cancelEnable"><span class="type">bool</span> QCtmLoadingDialog::<span class="name">cancelEnable</span>() const</h3>
<p>是否可以按ESC键取消显示loading窗口.</p>
<div class="admonition note"><p><b>Note: </b>Getter function for property cancelEnable. </p>
</div><p><b>See also </b><a href="qctmloadingdialog.html#setCancelEnable" translate="no">setCancelEnable</a>.</p>
<!-- @@@cancelEnable -->
<!-- $$$closeEvent[overload1]$$$closeEventQCloseEvent* -->
<h3 class="fn" translate="no" id="closeEvent"><code class="details extra" translate="no">[override virtual protected]</code> <span class="type">void</span> QCtmLoadingDialog::<span class="name">closeEvent</span>(<span class="type"><a href="https://doc.qt.io/qt/qcloseevent.html" translate="no">QCloseEvent</a></span> *<i>event</i>)</h3>
<!-- @@@closeEvent -->
<!-- $$$done[overload1]$$$done -->
<h3 class="fn" translate="no" id="done"><code class="details extra" translate="no">[slot]</code> <span class="type">void</span> QCtmLoadingDialog::<span class="name">done</span>()</h3>
<p>Loading 窗口加载完成时调用该函数，测试exec返回Done.</p>
<p><b>See also </b><a href="qctmloadingdialog.html#cancel" translate="no">cancel</a>.</p>
<!-- @@@done -->
<!-- $$$eventFilter[overload1]$$$eventFilterQObject*QEvent* -->
<h3 class="fn" translate="no" id="eventFilter"><code class="details extra" translate="no">[override virtual protected]</code> <span class="type">bool</span> QCtmLoadingDialog::<span class="name">eventFilter</span>(<span class="type"><a href="https://doc.qt.io/qt/qobject.html#QObject" translate="no">QObject</a></span> *<i>watched</i>, <span class="type"><a href="https://doc.qt.io/qt/qevent.html" translate="no">QEvent</a></span> *<i>event</i>)</h3>
<p>Reimplements: <a href="https://doc.qt.io/qt/qobject.html#eventFilter" translate="no">QObject::eventFilter</a>(QObject *watched, QEvent *event).</p>
<!-- @@@eventFilter -->
<!-- $$$exec[overload1]$$$exec -->
<h3 class="fn" translate="no" id="exec"><code class="details extra" translate="no">[slot]</code> <span class="type"><a href="qctmloadingdialog.html#Result-enum" translate="no">QCtmLoadingDialog::Result</a></span> QCtmLoadingDialog::<span class="name">exec</span>()</h3>
<p>阻塞并显示 loading 窗口.</p>
<div class="admonition note">
<p><b>Note: </b>不应使用show来显示loading.</p>
</div>
<!-- @@@exec -->
<!-- $$$hideEvent[overload1]$$$hideEventQHideEvent* -->
<h3 class="fn" translate="no" id="hideEvent"><code class="details extra" translate="no">[override virtual protected]</code> <span class="type">void</span> QCtmLoadingDialog::<span class="name">hideEvent</span>(<span class="type"><a href="https://doc.qt.io/qt/qhideevent.html" translate="no">QHideEvent</a></span> *<i>event</i>)</h3>
<!-- @@@hideEvent -->
<!-- $$$keyPressEvent[overload1]$$$keyPressEventQKeyEvent* -->
<h3 class="fn" translate="no" id="keyPressEvent"><code class="details extra" translate="no">[override virtual protected]</code> <span class="type">void</span> QCtmLoadingDialog::<span class="name">keyPressEvent</span>(<span class="type"><a href="https://doc.qt.io/qt/qkeyevent.html" translate="no">QKeyEvent</a></span> *<i>event</i>)</h3>
<!-- @@@keyPressEvent -->
<!-- $$$movie[overload1]$$$movie -->
<h3 class="fn" translate="no" id="movie"><span class="type"><a href="https://doc.qt.io/qt/qmovie.html" translate="no">QMovie</a></span> *QCtmLoadingDialog::<span class="name">movie</span>() const</h3>
<p>返回动画指针.</p>
<p><b>See also </b><a href="qctmloadingdialog.html#setMovie" translate="no">setMovie</a>.</p>
<!-- @@@movie -->
<!-- $$$setCancelEnable -->
<h3 class="fn" translate="no" id="setCancelEnable"><span class="type">void</span> QCtmLoadingDialog::<span class="name">setCancelEnable</span>(<span class="type">bool</span> <i>flag</i>)</h3>
<p>设置是否可以按ESC键取消 <i translate="no">flag</i>.</p>
<div class="admonition note"><p><b>Note: </b>Setter function for property <a href="qctmloadingdialog.html#cancelEnable" translate="no">cancelEnable</a>. </p>
</div><p><b>See also </b><a href="qctmloadingdialog.html#cancelEnable" translate="no">cancelEnable</a>.</p>
<!-- @@@setCancelEnable -->
<!-- $$$setMovie[overload1]$$$setMovieQMovie* -->
<h3 class="fn" translate="no" id="setMovie"><span class="type">void</span> QCtmLoadingDialog::<span class="name">setMovie</span>(<span class="type"><a href="https://doc.qt.io/qt/qmovie.html" translate="no">QMovie</a></span> *<i>movie</i>)</h3>
<p>设置动画 <i translate="no">movie</i>.</p>
<p><b>See also </b><a href="qctmloadingdialog.html#movie" translate="no">movie</a>.</p>
<!-- @@@setMovie -->
<!-- $$$showEvent[overload1]$$$showEventQShowEvent* -->
<h3 class="fn" translate="no" id="showEvent"><code class="details extra" translate="no">[override virtual protected]</code> <span class="type">void</span> QCtmLoadingDialog::<span class="name">showEvent</span>(<span class="type"><a href="https://doc.qt.io/qt/qshowevent.html" translate="no">QShowEvent</a></span> *<i>e</i>)</h3>
<!-- @@@showEvent -->
</div>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> QCustomUi
   Documentation contributions included herein are the copyrights of
   their respective owners.<br/>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br/> </div>
</body>
</html>
